package com.dzpk.gameserver.enumeration;

public enum GodhoodRewardTypeEnum {

    TYPE_GOLD(1), TYPE_DIAMOND(2), // 钻石

    TYPE_DATA_DIAMOND(6), // 和表映射

    ;
    private int id;

    public int getId() {
        return id;
    }

    GodhoodRewardTypeEnum(int id) {
        this.id = id;
    }

    /**
     * 是否是合法的Type
     * 
     * @param id
     * @return
     */
    public static boolean isValid(int id) {
        for (GodhoodRewardTypeEnum en : GodhoodRewardTypeEnum.values()) {
            if (id == en.id) {
                return true;
            }
        }
        return false;
    }
}
